<?php

require 'header.php';

?>

    <div class="middle">
		<div class="simple-container-left" id="page:main-container">
			<div class="container" id="page:container">
				<div class="main">
					<div class="content-container">
						<div class="content" id="content">
							<div class="content-header">
								<table class="grid-header" cellspacing="0">
									<tbody>
										<tr>
											<td style=""><h3 class="icon-head head-customer">New Customer</h3></td>
											<td class="a-right">
												<button type="button" class="scalable back" onclick="setLocation('customer.php')" style=""><span>Back</span></button>
												<button type="button" class="scalable" onclick="setLocation(window.location.href)" style=""><span>Reset</span></button>
												<button type="button" class="scalable save" onclick="editForm.submit();" style=""><span>Save Customer</span></button>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
							<div id="messages"></div>
							
							<form name="form1" id="form1" action="/" method="post">
							<div class="entry-edit">
								<h4 class="icon-head head-edit-form fieldset-legend">Contact Information</h4>
								<fieldset>												
									<table width="100%" cellspacing="0">
										<tbody>
											<tr>
												<td>
													<table width="100%" cellspacing="5">
														<tbody>
															<tr>
																<td>ID Number <span class="required">*</span></td>
																<td>
																	<table>
																		<tbody>
																			<tr>
																				<td>
																					<input type="radio" name="id_type" checked="checked" value="auto" onClick="changeIdType('id_auto');"> Auto
																				</td>
																				<td>
																					<div id="id_auto" style="position:relative;">
																						&nbsp; &nbsp; <b><?php echo date('Y') . '-xxxx'; ?></b>
																					</div>
																				</td>
																			</tr>
																			<tr>
																				<td>
																					<input type="radio" name="id_type" value="manual" onClick="changeIdType('id_manual');"> Manual
																				</td>
																				<td>
																					<div id="id_manual" style="float:left;">
																					&nbsp; &nbsp; <select name="id_year">
																						<option>2008</option>
																						<option>2007</option>
																						<option>2006</option>
																						<option>2005</option>
																						<option>2004</option>
																						<option>2003</option>
																						<option>2002</option>
																						<option>2001</option>
																						<option>2000</option>
																						<option>1999</option>
																						<option>1998</option>
																						<option>1997</option>
																						<option>1996</option>
																						<option>1995</option>
																						<option>1994</option>
																						<option>1993</option>
																						<option>1992</option>
																						<option>1991</option>
																						<option>1990</option>
																					</select> <b>-</b> 
																					<input type="text" name="id_no" maxlength="4" size="4" />
																					</div>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<script type="text/javascript"><!--
																		function changeIdType(divName) {
																			var showDivName = divName, hideDivName = '';
																			if (divName == 'id_auto') {
																				hideDivName = 'id_manual';
																			} else if (divName == 'id_manual') {
																				hideDivName = 'id_auto';
																			} else {
																				return;
																			}
																			if (document.getElementById) { // DOM3 = IE5, NS6
																				document.getElementById(showDivName).style.visibility = 'visible';
																				document.getElementById(hideDivName).style.visibility = 'hidden';
																			} else {
																				if (document.layers) { // Netscape 4
																					eval( "document." + showDivName + ".visibility = 'visible'");
																					eval( "document." + hideDivName + ".visibility = 'hidden'");
																				} else { // IE 4
																					eval( "document.all." + showDivName + ".style.visibility = 'visible'");
																					eval( "document.all." + hideDivName + ".style.visibility = 'hidden'");
																				}
																			}
																		}
																		changeIdType('id_auto');
																		//-->
																	</script>

																</td>
															</tr>
															<tr>
																<td>Last Name <span class="required">*</span></td>
																<td><input name="lastname" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>First Name <span class="required">*</span></td>
																<td><input name="firstname" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Middle Name</td>
																<td><input name="middlename" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Address <span class="required">*</span></td>
																<td><input name="address" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Barangay <span class="required">*</span></td>
																<td><input name="barangay" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>City <span class="required">*</span></td>
																<td><input name="city" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>					
															<tr>
																<td>Country <span class="required">*</span></td>
																<td><input name="country" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>		
															<tr>
																<td>Phone <span class="required">*</span></td>
																<td><input name="phone" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Mobile </td>
																<td><input name="mobile" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Birthdate <span class="required">*</span></td>
																<td><input name="birthdate" value="" class="required-entry required-entry input-text" type="text"></td>
															</tr>
															<tr>
																<td>Gender <span class="required">*</span></td>
																<td>
																	<select name="gender" class="required-entry required-entry select" type="select">
																	<option value="1">Male</option>
																	<option value="2">Female</option>
																	</select>
																</td>
															</tr>
															<tr>
																<td>Civil Status <span class="required">*</span></td>
																<td>
																	<select name="civil_status" class="required-entry required-entry select" type="select">
																	<option value="1">Single</option>
																	<option value="2">Married</option>
																	<option value="3">Divorced</option>
																	<option value="4">Separated</option>
																	<option value="5">Widowed</option>
																	</select>
																</td>
															</tr>
														</tbody>
													</table>
									
												</td>
												<td>
												
													<table width="100%" cellspacing="5">
														<tbody>
															<tr>
																<td align="center"><img src="img/no_photo.jpg" width="96" height="96" /></td>
															</tr>
															<tr>
																<td align="center"><input name="photo" value="" class="required-entry required-entry input-text" type="file"></td>
															</tr>
														</tbody>
													</table>
											
												</td>
											</tr>
										</tbody>
									</table>
								
								</fieldset>
								
								<h4 class="icon-head head-edit-form fieldset-legend">Business Information &nbsp; &nbsp; [ <input type="checkbox" name="enable_business_info" checked="checked" onclick="enableBusinessInfo()"> Enable ]</h4>
								<fieldset>
									<table width="100%" cellspacing="5">
										<tbody>
											<tr>
												<td>Business ID <span class="required">*</span></td>
												<td><input name="business_id" value="" class="required-entry required-entry input-text" type="text"></td>
											</tr>
											<tr>
												<td>Business Name <span class="required">*</span></td>
												<td><input name="business_name" value="" class="required-entry required-entry input-text" type="text"></td>
											</tr>
											<tr>
												<td>Type of Industry <span class="required">*</span></td>
												<td>
													<select name="industry_type" class="required-entry required-entry select" type="select">
													<option value="1">Information Technology</option>
													<option value="2">Education</option>
													</select>
												</td>
											</tr>
											<tr>
												<td>Average Daily Income <span class="required">*</span></td>
												<td><input name="average_daily_income" value="" class="required-entry required-entry input-text" type="text"></td>
											</tr>
											<tr>
												<td>Date Business Established <span class="required">*</span></td>
												<td><input name="business_established_date" value="" class="required-entry required-entry input-text" type="text"></td>
											</tr>
											<tr>
												<td>Days of Operation <span class="required">*</span></td>
												<td>
													<select name="days_operation" class="required-entry required-entry select" type="select">
													<option value="1">Daily</option>
													<option value="2">Weekly</option>
													<option value="3">Monthly</option>
													<option value="4">Quarterly</option>
													<option value="5">Semi-Annual</option>
													<option value="6">Annual</option>
													</select>
												</td>
											</tr>
											<tr>
												<td>Notes</td>
												<td><textarea name="notes" cols="50" rows="10"></textarea></td>
											</tr>
										</tbody>
									</table>

								</fieldset>
								
								<script type="text/javascript"><!--
									function enableBusinessInfo() {
										var bizForm = document.form1;
										var checked = !bizForm.enable_business_info.checked;

										bizForm.business_id.disabled = checked;
										bizForm.business_name.disabled = checked;
										bizForm.industry_type.disabled = checked;
										bizForm.average_daily_income.disabled = checked;
										bizForm.business_established_date.disabled = checked;
										bizForm.days_operation.disabled = checked;
										bizForm.notes.disabled = checked;
									}
									enableBusinessInfo();
									//-->
								</script>
								
								
								<div align="center">
									<button type="button" class="scalable back" onclick="setLocation('customer.php')" style=""><span>Back</span></button>
									<button type="button" class="scalable" onclick="setLocation(window.location.href)" style=""><span>Reset</span></button>
									<button type="button" class="scalable save" onclick="editForm.submit();" style=""><span>Save Customer</span></button>
								</div>

							</div>
							
							
							</form>
						</div>
					</div>
					
					<div class="section-menu" id="page:left">
						<h3>Profile Center</h3>
						<ul id="customer_info_tabs" class="tabs">
							<li>
						        <a href="customer.php" title="Contact Information" class="tab-item-link active">
					            <span>Contact Information</span>
						        </a>        
						    </li>
						    <li>
						        <a href="collateral.php" title="Collateral Items" class="tab-item-link">
					            <span>Collateral Items</span>
						        </a>		        
						    </li>
						    <li>
						        <a href="loan.php" title="Business Information" class="tab-item-link">
					            <span>Loan</span>
						        </a>        
						    </li>
						    <li>
						        <a href="loan_payments.php" title="Business Information" class="tab-item-link">
					            <span>Payments</span>
						        </a>        
						    </li>
						</ul>
						<div class="bottom"></div>
					</div>
              	</div>
			</div>
		</div>
	</div>

<?php

require 'footer.php';

?>